home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1987 November / Ahoy_Magazine_87-11_1987_Double_L.d64 / Fraction Fun (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  449b  |  19 lines

  1. 2 rem ================================
  2. 3 rem   commodares solution #43-4 :
  3. 4 rem     fraction fun
  4. 5 rem   solution by
  5. 6 rem     frank walczer
  6. 7 rem ================================
  7. 10 print"[147]the valid numbers are:":print
  8. 20 for d=100 to 999
  9. 30 n=d*d : d$=str$(d) : n$=str$(n)
  10. 40 d$=mid$(d$,2,3) : n$=mid$(n$,2,6) :  t$=d$+n$
  11. 50 if len(t$)<>9 then 120
  12. 60 for x=1 to 8
  13. 70 for y=x+1 to 9
  14. 80 if mid$(t$,x,1)=mid$(t$,y,1) then 120
  15. 90 next y
  16. 100 next x
  17. 110 print"   ";d$" * ";d$;" = ";n$
  18. 120 next d
  19.